package com.kingyun.gpsinspection.purificationservice.facade.service.jsm;

import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.kingyun.gpsinspection.purificationservice.facade.model.jsm.IntDataSrcItemValue;
import com.kingyun.gpsinspection.purificationservice.facade.model.jsm.Report;
import com.kingyun.gpsinspection.purificationservice.facade.model.jsm.ReportTotalValue;
import com.kingyun.gpsinspection.purificationservice.facade.model.jsm.Ztree;

import java.util.HashMap;
import java.util.List;

/**
 * 数据集报表业务接口
 * Created by yangcs on 2017/3/22.
 */
public interface OutReportService {

    /**
     * 获取表头
     * @param reportId
     * @return
     */
    JSONArray getHeads(String reportId);

    /**
     * 获取合计
     * @param reportId
     * @return
     */
    JSONArray getSums(String reportId);

    /**
     * 获取报表基本信息
     * @param reportId
     * @param editable
     * @return
     */
    JSONObject getInfo(String reportId, boolean editable);

    /**
     * 获取列表数据
     * @param reportId
     * @param remark
     * @return
     */
    JSONArray getData(String reportId, String remark);

    /**
     * 生产单元树
     * @param keyword
     * @return
     */
    List<Ztree> loadServiceNode(String keyword);

    /**
     * 修改报表信息
     * @param report
     * @return
     */
    int saveInfo(Report report);

    /**
     * 修改整点数据
     * @param value
     * @return
     */
    HashMap saveValue(IntDataSrcItemValue value);

    /**
     * 修改合计数据
     * @param reportTotalValue
     * @return
     */
    int saveSum(ReportTotalValue reportTotalValue, String userId);
}
